<?php


namespace app\home\model\page\circle;


use app\api\model\dao\ConsumerRank;
use app\library\Error;
use app\library\PageBase;

class ConsumerRankPage extends PageBase
{
    private $objconsumerRank;

    public function __construct()
    {
        parent::__construct();
        $this->objconsumerRank = new ConsumerRank();
    }

    public function excute($param)
    {
        $ret = $this->checkToken($param);
        if (false === $ret) {
            header('Location:/home/loginpage');
            return $this->getRes(Error::ERR_NO_AUTH);
        }
        try {
            $ret = $this->objconsumerRank->consumerRankPage();
        } catch (Exception $e) {
            return $this->getRes(Error::ERR_SYS, $e->getMessage());
        }
        $this->data = $ret;
        return $this->getRes();
    }

}